home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 April / Chip CMCD0400.iso / SOFTWARE / Demo / InfoPulse / GateKeeper / gk3full.exe / data1.cab / ConfigSite_Files / services / editcache.agp < prev    next >
Encoding:
Text File  |  1999-06-17  |  4.4 KB  |  189 lines

  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  4. <meta NAME="Author,Design" Content="GateKeeper Team; gatekeeper@infopulse.net">
  5. <meta NAME="Copyright" Content="Infopulse; www.infopulse.net">
  6. <title>Empty</title>
  7. </head>
  8.  
  9. <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080">
  10. <%
  11.     
  12.     if Request.ReqParam("action") = "Empty cache" Then 
  13.         Cache.ClearCache()
  14.     End If
  15.  
  16.     if Request.ReqParam("action") = "Commit" Then
  17.         ' Process the Cache settings
  18.         if Request.ReqParam("Size") <> "" then
  19.             Cache.Size = Request.ReqParam("Size")
  20.         else
  21.             Cache.Size = 5
  22.         end if
  23.  
  24.  
  25.     if Request.ReqParam("LeaseDuration") = "Never" Then
  26.             Cache.TimeToLive =24*365
  27.     End If
  28.  
  29.     if Request.ReqParam("LeaseDuration") = "Every time" Then
  30.             Cache.TimeToLive =0
  31.     End If
  32.  
  33.     if Request.ReqParam("LeaseDuration") = "After" Then
  34.         
  35.         if Request.ReqParam("TTL") <> "" then
  36.             Cache.TimeToLive = Request.ReqParam("TTL")
  37.         else
  38.             Cache.TimeToLive = 6
  39.         end if
  40.  
  41.     End If
  42.     
  43.  
  44.         
  45.  
  46.         On Error Resume Next
  47.         Cache.Commit
  48.         If Not Err.Number = 0 Then 
  49.             ErrLine = Err.Description
  50.         else
  51.             Response.Redirect("hlpServices.htm")
  52.         End If
  53.     End If
  54. %>
  55.     <p><big><strong><font face="Arial">Edit the Cache service</font></strong></big></p>
  56. <%
  57.     If Not Len(ErrLine) = 0 Then
  58.         Response.Write("<B><FONT COLOR=""#FF0000"">" & ErrLine & "</FONT></B><br>")
  59.     End If
  60. %>
  61.  
  62. <form method="POST" action= "/services/editcache.agp">
  63.     <table border="1" cellpadding="0" cellspacing="0" width="100%">
  64.     <tr>
  65.         <td width="40%" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  66.             Option
  67.         </font></strong></td>
  68.         <td width="60%" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  69.             Value
  70.         </font></strong></td>
  71.     </tr>    
  72.     <tr>
  73.         <td width="40%"><strong><font face="Arial">
  74.             Cache size (in MB)
  75.         </font></strong></td>
  76.         <td width="60%">
  77.             <input type="text" size="10" maxlength="4" name="Size" value="<%Response.Write(Cache.Size)%>">
  78.         </td>        
  79.     </tr>
  80.     <tr>
  81.         <td width="40%"><strong><font face="Arial">
  82.             Current cache size (in MB)
  83.         </font></strong></td>
  84.         <td width="60%"><font face="Arial">
  85.             <%Response.Write(Cache.CurrentExactSize)%>
  86.             (<%Response.Write(Cache.CurentByteSize)%>    bytes)
  87.         </font></td>
  88.     </tr>
  89.     <tr>
  90.         <td width="40%"><strong><font face="Arial">
  91.             Cache directory
  92.         </font></strong></td>
  93.         <td width="60%"><font face="Arial">
  94.             <%Response.Write(Cache.CacheDirectory)%>
  95.         </font></td>        
  96.     </tr>
  97.     </table>
  98.  
  99.     <p><big><strong><font face="Arial">Compare with original resource</font></strong></big></p>
  100.  
  101.     <table border="1" cellpadding="0" cellspacing="0" width="100%">
  102.     <tr>
  103.         <td width="10%" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  104.             Selection
  105.         </font></strong></td>
  106.         <td width="90%" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  107.             Meaning
  108.         </font></strong></td>
  109.     </tr>    
  110.         <tr>
  111.         <td width="10%">        
  112.         <center>
  113.         <%
  114.             if Cache.TimeToLive <> 0 and  Cache.TimeToLive <> 8760  Then
  115.         %>
  116.             <input type="radio" size="55" name="LeaseDuration" Value="After" CHECKED>
  117.         <%
  118.             Else
  119.         %>
  120.             <input type="radio" size="55" name="LeaseDuration" Value="After" UNCHECKED>
  121.         <%
  122.             End If
  123.         %>
  124.         </center>
  125.         </td>        
  126.  
  127.         <td width="90%">
  128.          After
  129.          <input type="text" size="10" maxlength="4" name="TTL" value="<%Response.Write(Cache.TimeToLive)%>">
  130.          hours
  131.         </td>
  132.  
  133.  
  134.     <tr>
  135.         <td width="10%">
  136.         <center>
  137.         <%
  138.             if Cache.TimeToLive = 0 Then
  139.         %>
  140.                 <input type="radio" size="55" name="LeaseDuration" Value="Every time" CHECKED>
  141.         <%
  142.             Else
  143.         %>
  144.                 <input type="radio" size="55" name="LeaseDuration" Value="Every time" UNCHECKED>
  145.         <%
  146.             End If
  147.         %>
  148.  
  149.         </center>
  150.         </td>        
  151.         <td width="90%">Every time</td>
  152.     </tr>
  153.  
  154.     <tr>
  155.         <td width="10%">
  156.         <center>
  157.         <%
  158.             if Cache.TimeToLive = 8760 Then
  159.         %>
  160.             <input type="radio" size="55" name="LeaseDuration" Value="Never" CHECKED>
  161.         <%
  162.             Else
  163.         %>
  164.                 <input type="radio" size="55" name="LeaseDuration" Value="Never" UNCHECKED>
  165.         <%
  166.             End If
  167.         %>
  168.  
  169.  
  170.         </center>
  171.         </td>        
  172.         <td width="90%">Never</td>
  173.     </tr>
  174.  
  175.     </tr>
  176.  
  177.  
  178.     </table>
  179.  
  180. <br>
  181.     <input type="submit" name="action" value="Commit">
  182.     <input type="submit" name="action" value="Empty cache">
  183. </form>
  184.  
  185. <font size="1" face="Arial"><%Response.Write(GateKeeper.Version)%></font>
  186.  
  187. </body>
  188. </html>
  189.